# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VMwareEngine.V1.Model.VmwareEngineNetwork do
  @moduledoc """
  VMware Engine network resource that provides connectivity for VMware Engine private clouds.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation time of this resource.
  *   `description` (*type:* `String.t`, *default:* `nil`) - User-provided description for this VMware Engine network.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Checksum that may be sent on update and delete requests to ensure that the user-provided value is up to date before the server processes a request. The server computes checksums based on the value of other fields in the request.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Identifier. The resource name of the VMware Engine network. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the VMware Engine network.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Required. VMware Engine network type.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System-generated unique identifier for the resource.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Last update time of this resource.
  *   `vpcNetworks` (*type:* `list(GoogleApi.VMwareEngine.V1.Model.VpcNetwork.t)`, *default:* `nil`) - Output only. VMware Engine service VPC networks that provide connectivity from a private cloud to customer projects, the internet, and other Google Cloud services.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :etag => String.t() | nil,
          :name => String.t() | nil,
          :state => String.t() | nil,
          :type => String.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :vpcNetworks => list(GoogleApi.VMwareEngine.V1.Model.VpcNetwork.t()) | nil
        }

  field(:createTime, as: DateTime)
  field(:description)
  field(:etag)
  field(:name)
  field(:state)
  field(:type)
  field(:uid)
  field(:updateTime, as: DateTime)
  field(:vpcNetworks, as: GoogleApi.VMwareEngine.V1.Model.VpcNetwork, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.VMwareEngine.V1.Model.VmwareEngineNetwork do
  def decode(value, options) do
    GoogleApi.VMwareEngine.V1.Model.VmwareEngineNetwork.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VMwareEngine.V1.Model.VmwareEngineNetwork do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
